Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concurrency fix #1802

Merged
merged 1 commit into from
Feb 19, 2024
Merged

concurrency fix #1802

merged 1 commit into from
Feb 19, 2024

Conversation

tudor-malene
Copy link
Collaborator

Why this change is needed

Add mutex around statedb operations

Copy link
Collaborator

@BedrockSquirrel BedrockSquirrel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be better to protect this in the guardian on the host side. We already have a mutex called submitDataLock that means L1 block and L2 batches are never submitted in parallel, perhaps we add submit tx to that same lock?

I just imagine that validateTx is read-only and if it's getting interfered with then it's probably clashing with one of those other methods, WDYT?

Copy link
Collaborator

@BedrockSquirrel BedrockSquirrel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after discord discussion, sounds like we're only worried about the clashing for simultaneous validate tx and other data changes shouldn't impact.

@tudor-malene tudor-malene merged commit ada2d2c into main Feb 19, 2024
2 checks passed
@tudor-malene tudor-malene deleted the tudor/fix_concurrency branch February 19, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants